package com.chen.positioning.mypositioning.service;

import com.chen.positioning.mypositioning.dao.MypositioningMapper;
import com.chen.positioning.mypositioning.entity.Mypositioning;
import com.chen.positioning.user.dao.UserManagementMapper;
import com.chen.positioning.user.entity.UserManagement;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 定位信息 Service
 */
@Service
public class MypositioningService {
    private static final Logger logger = LoggerFactory.getLogger(MypositioningService.class);

    @Autowired
    private MypositioningMapper mypositioningMapper;

    /**
     * 添加定位
     *
     * @param mypositioning
     * @return
     */
    public int addMypositioningInfo(Mypositioning mypositioning) throws Exception {
        return mypositioningMapper.insertMypositioningInfo(mypositioning);
    }

    /**
     * 查询我的定位记录
     */
    public List<Mypositioning> findAllMypositioning(Integer userId) throws Exception{
        return mypositioningMapper.findAllMypositioning(userId);
    }
}
